/**
 @file LR1.h
 @brief Ejemplo de Comandos y llamadas implementadas por el usuario.
 @date   15/12/2012
 @version v.0.9
 @author Julian Ovalle
         julianovalle@ula.ve
*/

#ifndef LR1_H_
#define LR1_H_

#include <inttypes.h>
#include <list>
#include <MessageIO.h>

using namespace std;

#define LR1_DEBUG

#define FWD 0x77
#define FWD_DIST 0x57
#define FWD_PULSE 0x66

#define BWD 0x73
#define LEFT_DEG 0x61
#define LEFT_RAD 0x41
#define RIGHT_DEG 0x64
#define RIGHT_RAD 0x44
#define STOP 0x71
#define READ 0x72
#define SWEEP 0x62

#define TEST 0x54
#define TEST2 0x74

int avanzarDistanciaCM( uint8_t vel , unsigned short int dist, char * id , list<node_t> list);

int girarGrados (uint8_t dir,uint8_t vel, short int grados, char *id, list<node_t> list);

int girarRadianes (uint8_t dir, uint8_t vel, float radianes, char *id, list<node_t> list);

int avanzarPulsos( uint8_t vel , short int pulsos, char * id, list<node_t> list );

int avanzar (uint8_t vel, char *id, list<node_t> list);

int retroceder (uint8_t vel, char *id, list<node_t> list);

int detenerse ( char *id, list<node_t> list);

unsigned short int* barridoUS(char *id, list<node_t> list);

short int sensorUSobtenerMedidaCM(char *id, list<node_t> list);

int foo_cmd (uint8_t cmd, int arg1, int arg2, int arg3, int arg4, char *id, list<node_t> list);

int foo_dbl (uint8_t cmd, int arg1, int arg2, double arg3, char *id, list<node_t> list);

void comander(MessageIO msg);

void commandTester(MessageIO msg);

int testCommand(char *id, list<node_t> list);

int testCommand2(char *id, list<node_t> list);

#endif /* LR1_H_ */
